import {CUSTOM_ELEMENTS_SCHEMA, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';

import {StompRoutingModule} from './stomp-routing.module';
import {StompComponent} from './stomp.component';
import {StompConfig, StompService} from '@stomp/ng2-stompjs';
import {stompConfig} from './stompConfig';
import {StompRawdataComponent} from './stomp-rawdata/stomp-rawdata.component';
import {StompStatusComponent} from './stomp-status/stomp-status.component';
import {PersonalService} from '../../services/personal.service';

@NgModule({
  imports: [
    CommonModule,
    StompRoutingModule,
    FormsModule,
    HttpModule
  ],
  declarations: [StompComponent, StompRawdataComponent, StompStatusComponent],
  providers: [
    PersonalService,
    StompService,
    {
      provide: StompConfig,
      useValue: stompConfig
    }
  ],
  bootstrap: [StompComponent],
  schemas : [
    CUSTOM_ELEMENTS_SCHEMA
  ]
})
export class StompModule {
}
